home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / faq / comp / fonts_fa / part12 < prev    next >
Text File  |  1994-01-25  |  21KB  |  545 lines

  1. Newsgroups: comp.fonts,comp.answers,news.answers
  2. Path: bloom-beacon.mit.edu!xlink.net!howland.reston.ans.net!usenet.ins.cwru.edu!eff!news.kei.com!world!ora.com!norm
  3. From: norm@ora.com (Norman Walsh)
  4. Subject: comp.fonts FAQ: Utilities
  5. Message-ID: <font-faq-12_759515252@ora.com>
  6. Followup-To: poster
  7. Summary: This posting answers frequently asked questions about fonts.
  8.          It addresses both general font questions and questions that
  9.          are specific to a particular platform.
  10. Sender: norm@ora.com (Norman Walsh)
  11. Supersedes: <font-faq-12_757281740@ora.com>
  12. Reply-To: norm@ora.com (Norman Walsh)
  13. Organization: O'Reilly and Associates, Inc.
  14. References: <font-faq-1_759515252@ora.com>
  15. Date: Tue, 25 Jan 1994 16:28:21 GMT
  16. Approved: news-answers-request@MIT.Edu
  17. Expires: Thu, 10 Mar 1994 16:27:32 GMT
  18. Lines: 524
  19. Xref: bloom-beacon.mit.edu comp.fonts:6523 comp.answers:3568 news.answers:14508
  20.  
  21. Archive-name: fonts-faq/part12
  22. Version: 2.0.3
  23.  
  24. Subject: 10. Utilities
  25.   
  26.   I have just started collecting information about font utilities.  I
  27.   will gladly add any information that you can pass my way.  Please send
  28.   your submissions to norm.
  29.   
  30.   I would appreciate it if you could include a paragraph or so of
  31.   description and the appropriate site/filename for retrieval.
  32.   
  33. Subject: 10.1. PS2PK
  34.   
  35.   PS2PK is a utility for converting Type1 postscript fonts into TeX PK
  36.   files.  The source code is distributed and it has been compiled for
  37.   both *nix boxes and MS-DOS based machines.
  38.   
  39.   Here is the original announcement:
  40.   
  41.                             Ps2pk-1.2 available
  42.                             -------------------
  43.                                  (June 1992)
  44.        
  45.        Version 1.2 of ps2pk is now available on:
  46.        ftp.urc.tue.nl (address: 131.155.2.79)
  47.        directory:    /pub/tex
  48.        files:        ps2pk12.README         (  1k)    This file
  49.                      ps2pk12.tar.Z          (391k)    Sources
  50.                      ps2pk386.zip           (232k)    MSDOS executables
  51.                      utopia.tar.Z           (342k)    Adobe Utopia font family
  52.                      courier.tar.Z          (207k)    IBM Courier font family
  53.        
  54.        For people having difficulties in handling UNIX `.tar.Z' format I
  55.        have made some UNIX tools (only executables) available in:
  56.        directories:  /pub/unixtools/dos
  57.                      /pub/unixtools/vms
  58.        
  59.        See the system specific TARZ file for some help.
  60.        
  61.        Ftp.urc.tue.nl can not handle E-mail requests. But sites are free
  62.        to put the ps2pk12 stuff on any server that can.
  63.   
  64.   When do you need ps2pk?
  65.   =======================
  66.   
  67.   Ps2pk is a tool that converts a PostScript type1 font into a corres-
  68.   ponding TeX PK font.  The tool is especially interesting if you want to
  69.   use fully hinted type1 fonts in your DVI previewer (instead of the
  70.   unhinted type1 fonts currently used in GhostScript) or on a printer
  71.   that has no PostScript interpreter.
  72.   
  73.   In order to use the ps2pk generated fonts your driver and previewer need
  74.   to support virtual fonts.  The reason is that PostScript fonts and TeX
  75.   fonts do have a different font encoding and handle ligatures in a
  76.   different way.  With virtual fonts the PostScript world (encoding +
  77.   ligatures) can be mapped to the old style TeX world on which the current
  78.   plain macro packages still are based (despite the fact that TeX3.0 can
  79.   handle 8bits).
  80.   
  81.   It is also possible to use the ps2pk generated PK fonts directly
  82.   
  83.   In addition, a modified version of PS2PK exists on ibis.cs.umass.edu.  I
  84.   have added some hacks to better support really large renderings and a
  85.   primitive "range" facility.
  86.   
  87. Subject: 10.2. TeX Utilities
  88.   
  89.   There are many TeX font utilities.  For TeX related questions, I direct
  90.   you to comp.text.tex or the Info-TeX mailing list.  I will happily list
  91.   any utilities here that the comp.fonts public feels should be present.
  92.   I am listing MetaFont because it is the obvious font-specific component
  93.   of TeX and PKtoSFP because it allows anyone to use PS2PK to create
  94.   LaserJet softfonts.
  95.   
  96.   Liam R. E. Quin is the original author of the MetaFont section.  It has
  97.   been hacked at a bit by norm to make it fit the tone of the comp.fonts
  98.   FAQ.  Assume that norm is responsible for any errors, not Liam.
  99.   
  100.   MetaFont
  101.   ========
  102.   
  103.   About MetaFont:
  104.   ---------------
  105.   
  106.   Metafont is a programming language for describing fonts.  It was
  107.   written by Donald Knuth and is documented in
  108.   
  109.          Computers & Typesetting/C: The METAFONTbook
  110.          Knuth, Donald E.
  111.          Addison Wesley, 1986
  112.          ISBN 0-201-13445-4, or 0-201-13444-6 (soft cover)
  113.          Library access: Z250.8.M46K58, or 686.2'24, or 85-28675.
  114.   
  115.   A font written in MetaFont is actually a computer program which, when
  116.   run, will generate a bitmap (`raster') for a given typeface at a given
  117.   size, for some particular device.
  118.   
  119.   What do you need in order to use the fonts:
  120.   -------------------------------------------
  121.   
  122.   You cannot print the MetaFont fonts directly (unless you want a listing
  123.   of the program, that is).  Instead, you must generate a bitmap font and
  124.   use that to print something.
  125.   
  126.   If you are using TeX, the sequence of steps is something like this:
  127.   
  128.   MF to MetaFont to GF
  129.        Convert a MetaFont program into a bitmapped font.  Also produces a
  130.           TFM file.
  131.   
  132.   MF to MetaFont to TFM
  133.        Covnert a MetaFont program into a TFM file.  Also produces     a
  134.        GF bitmapped font.
  135.   
  136.   GF to GFtoPK to PK
  137.        Convert a GF bitmapped font into a compressed PK font.
  138.   
  139.   TEX + TFM to TeX to DVI
  140.        Produce a device independent output file.
  141.   
  142.   DVI + PK to dvi driver to output format
  143.        Produce a device-specific output file (or preview).
  144.   
  145.   The above steps are idealized.  In reality, you have to make sure that
  146.   the fonts get installed in the correct places and you may have to
  147.   adjust description files, etc.  The friendly folks on comp.text.tex can
  148.   probably get it staightened out for you if you can't find a local guru.
  149.   
  150.   If you are not using TeX, it's almost impossible to predict.  At some
  151.   point in the above sequence, you'll insert some other conversion
  152.   program and proceed differently.  Here, for example, is how you might
  153.   use TeX fonts with WordPerfect and a LaserJet printer.
  154.   
  155.   PK to PKtoSFP to SFP
  156.        Convert a TeX PK file into an HP LaserJet softfont.
  157.   
  158.   SFP to SFP2Auto to TFM
  159.        Make HP AutoFont Tagged Font Metric file.
  160.   
  161.   SFP + HP AutoFont TFM to PTR to Installed in WP
  162.        Install the new font in WordPerfect.
  163.   
  164.   Use WordPerfect as you normally would.
  165.   
  166. Subject: 10.3. MFPic
  167.   
  168.   MFpic is a macro package for including pictures in TeX documents.  The
  169.   idea behind this package is to have Metafont do the actual drawing, and
  170.   store the pictures in a font that TeX can include in the document.  The
  171.   macros have been designed so that the user should never have to learn
  172.   Metafont to use these macros--the TeX macros actually write the
  173.   Metafont file for you.
  174.   
  175. Subject: 10.4. fig2MF
  176.   
  177.   Briefly, fig2MF uses the mfpic macros to create formatted, commented MF
  178.   code from the fig graphics language. This means that programs like xfig
  179.   can be used as interactive font creation tools. I wrote fig2MF so that
  180.   I could portably illustrate TeX documents, but I suppose one could use
  181.   it to design letterforms as well.
  182.   
  183.   The package consists of a single C source code file, modified mfpic
  184.   macros, documentation, and sample fig files.  It is available at the
  185.   shsu archives.
  186.   
  187. Subject: 10.5. GNU Font Utilities
  188.   
  189.   Here is a brief description of the programs included:
  190.   
  191.      * imageto extracts a bitmap font from an image in PBM or IMG format,
  192.        or   converts the image to Encapsulated PostScript.
  193.   
  194.      * xbfe is a hand-editor for bitmap fonts which runs under X11.
  195.   
  196.      * charspace adds side bearings to a bitmap font.
  197.   
  198.      * limn fits outlines to bitmap characters.
  199.   
  200.      * bzrto converts a generic outline font to Metafont or PostScript.
  201.   
  202.      * gsrenderfont renders a PostScript outline font at a particular
  203.        point   size and resolution, yielding a bitmap font.
  204.   
  205.      * fontconvert can rearrange or delete characters in a bitmap font,
  206.        filter them, split them into pieces, combine them, etc., etc.
  207.   
  208.      * imgrotate rotates or flips an IMG file.
  209.   
  210.   We need volunteers to help create fonts for the GNU project.  You do not
  211.   need to be an expert type designer to help, but you do need to know
  212.   enough about TeX and/or PostScript to be able to install and test new
  213.   fonts.  Example: if you know neither (1) the purpose of TeX utility
  214.   program `gftopk' nor (2) what the PostScript `scalefont' command does,
  215.   you probably need more experience before you can help.
  216.   
  217.   If you can volunteer, the first step is to compile the font utilities.
  218.   After that, contact me [ed: Karl Berry] (karl@gnu.ai.mit.edu).  I will
  219.   get you a scanned type specimen image.  The manual explains how to use
  220.   these utilities to turn that into a font you can use in TeX or
  221.   PostScript.
  222.   
  223.   You can get the source by ftp from any GNU archive site.
  224.   
  225.   You can also order tapes with GNU software from the Free Software
  226.   Foundation (thereby supporting the GNU project); send mail to
  227.   gnu@prep.ai.mit.edu for the latest prices and ordering information, or
  228.   retrieve the file DISTRIB from a GNU archive.
  229.   
  230. Subject: 10.6. Font Editors
  231.   
  232.      * Editors for BDF fonts
  233.   
  234.        There is a bdf font editor that comes with HP/Apollo workstations.
  235.        It's called 'edfont'.  It's not the best but it works.
  236.   
  237.        Gary reports:
  238.   
  239.        The standard X distribution for X11R5 contains "xfed", which
  240.        allows you to play with BDF fonts.  "xfedor" has a more elaborate
  241.        user interface, and is available on most contrib directories.
  242.   
  243.        The last time I tried:
  244.   
  245.        "xfedor" couldn't handle BDF files with more than 256 characters.
  246.   
  247.        "xfed" aborts if the BDF file contains a COMMENT line with no other
  248.        text.  The workaround is to edit the BDF file, to put text after
  249.        the word COMMENT.  A single blank space is sufficient.  For some
  250.        reason, the standard BDF files included in the X release contain
  251.        blank spaces on the otherwise empty COMMENT lines.  It was
  252.        probably easier to add the space to the COMMENT lines of every BDF
  253.        file than it was to fix the lex code for xfed.  :-)
  254.   
  255.      * Editors for PK fonts
  256.   
  257.        The GNU font utilities include an X-based editor called Xbfe which
  258.        edits bitmapped fonts under X.
  259.   
  260.        Eberhard Mattes' emTeX includes PKedit.
  261.   
  262. Subject: 10.7. The T1 Utilities
  263.   
  264.   This is a snippet from the README file for I. Lee Hetherington's
  265.   t1utils package:
  266.   
  267.   t1utils is a collection of simple type-1 font manipulation programs.
  268.   Together, they allow you to convert between PFA (ASCII) and PFB
  269.   (binary) formats, disassemble PFA or PFB files into human-readable
  270.   form, reassemble them into PFA or PFB format.  Additionally you can
  271.   extract font resources from a Macintosh font file (ATM/Laserwriter).
  272.   
  273. Subject: 10.8. Where to get bitmap versions of the fonts
  274.   
  275.   There are archives containing the bitmaps of many of these fonts at
  276.   various sizes and resolutions.  The fonts must have been generated for
  277.   the correct print engine: e.g. write-white or write-black.  The
  278.   archives generally hold only the sizes used by TeX.  These are
  279.   `magstep' sizes, and are not exact point sizes.  It is probably better
  280.   to generate them from the Metafont sources yourself if you can.
  281.   
  282.   The best place to look for raster fonts was almost certainly:
  283.   mims-iris.waterloo.edu
  284.   
  285.   but it isn't any more, the fonts have all gone.  Let me know if you
  286.   find them elsewhere.  Most people seem to have moved to using
  287.   PostScript fonts or Bitstream ones instead now.
  288.   
  289.   Some other sites are:
  290.   
  291.          ctrsci.math.utah.edu (128.110.198.1)
  292.          science.utah.edu (128.110.192.2)
  293.          ymir.claremont.edu (134.173.4.23)
  294.   
  295.   The occasional posting of ftp sites to comp.misc and comp.archives
  296.   lists these and several other sites.
  297.   
  298. Subject: 10.9. Converting between font formats
  299.   
  300.   Conversions to and from pbm and pk format were posted to comp.text.tex
  301.   and to alt.sources on the 9th of August, 1990 by Angus Duggan.  The
  302.   program is pbmtopk, and there are also at least two patches.
  303.   
  304.   Chris Lewis' psroff package includes a program to go from pk both to
  305.   the HP LaserJet and to PostScript.
  306.   
  307.   John McClain <ophelp@tamvenus.bitnet> has some conversion programs for
  308.   various graphics formats to/and from pk files.
  309.   
  310.   A PC program, CAPTURE, turns HPGL files into PK format, US$130 from
  311.   Micro Programs Inc., 251 Jackson Ave., Syosset, NY 11791 U.S.A.
  312.   
  313.   Metaplot can take pen-plotter files and prouce metafont files.  Note:
  314.   Pat Wilcox is no longer at Ohio State.
  315.   
  316.   Kinch Computer Company sell .pk fonts derived from PostScript fonts.
  317.   Kinch Computer Co., 501 S. Meadow St.Ithaca, NY 14850 U.S.A.
  318.   telephone: +1 607 273 0222; fax: +1 607 273 0484
  319.   
  320. Subject: 10.10. Getting fonts by FTP and Mail
  321.   
  322.   If you are using ftp, you will need either the name of the host or the
  323.   Internet number.  For example, to connect to ymir, listed as ftp:
  324.   ymir.claremont.edu [134.173.4.23] you will need to type something like
  325.   
  326.                           ftp ymir.claremont.edu
  327.   
  328.   If that doesn't work, try using the number:
  329.   
  330.                              ftp 134.173.4.23
  331.   
  332.   If that doesn't work, on Unix systems you can use nslookup (it's
  333.   usually /usr/etc/nslookup) to find the host number - it might have
  334.   changed.  Type the entire host name, and after a few seconds nslookup
  335.   will give you the address.  Of course, if you have nslookup installed,
  336.   the first form will probably work...
  337.   
  338.   Once you have connected, you will need to go to the appropriate
  339.   directory, lists its contents, and retrieve the files.
  340.   
  341.   Most of the machines listed here run Unix, and you use "ls" and "cd" to
  342.   list files and to change directories.  Ymir runs VMS, and you will have
  343.   to put square brackets around directory names, like [this].
  344.   
  345.   Remember that although Metafont sources are text files, pk fonts are
  346.   not ASCII, and you will have to use binary mode for them.  In general,
  347.   use text mode for README files and *.mf files, and binary mode for
  348.   other font files.  Files ending in .Z are compressed binary files - you
  349.   will need to use binary mode, and then uncompress the files when you
  350.   get them.
  351.   
  352.   You can get files from ymir by sending mail messages to
  353.   
  354.                         mailserv@ymir.claremont.edu
  355.   
  356.   For example,
  357.   
  358.                        send [tex.mf.misc]cmapl10.mf
  359.   
  360.   will get the file cmapl10.mf from the directory "tex.mf.misc".  You
  361.   can't get binary files in this way.
  362.   
  363.   There is an ftp-by-mail BITNET service, BITFTP, for BITNET users.
  364.   
  365.   Before getting large files by mail, please remember to get permission
  366.   from all intervening sites.  Ask your site administrator, who can send
  367.   mail to Postmaster at each site on the way if necessary.
  368.   
  369. Subject: 10.11. MetaFont to PostScript Conversion
  370.   
  371.   There are (I believe) two programs that perform this task.  At least
  372.   one of them is called "mf2ps".  If you have any more information about
  373.   these tools, please let me know.
  374.   
  375.   Chang Jin-woong reports that he found the "mf2ps" package with Archie.
  376.   It is written by Shimon Yanai <yanai@israearn.bitnet> and Daniel M.
  377.   Berry <dberry@cs.technion.ac.il>. The source programs are written in
  378.   Pascal.
  379.   
  380. Subject: 10.12. How to use Metafont fonts with Troff
  381.   
  382.   If, when you run troff, you get the message `typesetter busy', you have
  383.   the original Ossanna-troff, also called otroff.  Chris Lewis has a
  384.   package which will let you use TeX fonts with troff - it's called
  385.   psroff, and comes with documentation.
  386.   
  387.          ftp: gatekeeper.dec.com (16.1.0.2) pub/misc/psroff-3.0
  388.          ftp: ftp.cs.toronto.edu [128.100.1.105] pub/psroff-3.0/*
  389.   
  390.   If, when you run troff, you get something like this:
  391.   
  392.          x T 300
  393.          x res 300 1 1
  394.   
  395.   you have ditroff.  This is sometimes called titroff or psroff.  In this
  396.   case, you will probably need to do the following:
  397.   
  398.     1. convert the font to your printer's format
  399.   
  400.     2. generate a width table for the font
  401.   
  402.     3. add the font to the DESC file for the appropriate device
  403.   
  404.     4. arrange for troff to download the font
  405.   
  406.     5. tell troff about the font by running `makedev DESC' in the
  407.        right place.
  408.   
  409.   If, when you run troff, you get something like this:
  410.   
  411.          X hp(SCM)(CM)(AF)(AD) 300 1 1
  412.          Y P default letter 2550 3300 0 0 90 90 2460 3210
  413.   
  414.   you have sqtroff:
  415.   
  416.     1. convert the font to your printer's format
  417.   
  418.     2. generate a width table for the font
  419.   
  420.     3. add the font to the DESC file for the appropriate device
  421.   
  422.     4. put the font in the appropriate raster directory
  423.   
  424.     5. tell sqtroff about the font by running `sqmakedev DESC' or
  425.        `sqinstall'.
  426.   
  427.   In each case, you should be able to get help from your vendor.
  428.   
  429.   Note that Chris Lewis' psroff package has software to make width tables
  430.   for troff from pk files.
  431.   
  432. Subject: 10.13. PKtoBDF / MFtoBDF
  433.   
  434.   From the SeeTeX distribution, programs to help previewers under X11.
  435.   They convert TeX PK files into X11 BDF fonts (which can be further
  436.   converted into one or more server native formats).
  437.   
  438. Subject: 10.14. PKtoPS
  439.   
  440.   Included in the psroff distribution, this utility converts PK fonts
  441.   into PostScript fonts (bitmaps, I presume).  If you have any more
  442.   information about these tools, please let me know.
  443.   
  444. Subject: 10.15. PKtoSFP / SFPtoPK
  445.   
  446.   Convert fonts from TeX PK format to HP LaserJet softfont (bitmap)
  447.   format.
  448.   
  449. Subject: 10.16. PostScript to MetaFont
  450.   
  451.   ps2mf started out as a way of creating bitmaps via MF for TeX. Only,
  452.   when I had just finished it, Piet Tutelaers came with ps2pk. This was a
  453.   far superior way runtime-wise. He uses the IBM X11-R5 fontutilities
  454.   library, which is extremely ugly code. But, it works. So, to generate
  455.   bitmaps, I suggest everyone use ps2pk.
  456.   
  457.   To generate a MF outline description, ps2mf is *the* tool. Yannis
  458.   Haralambous has just started a project where he wants to create
  459.   meta-ized fonts for MF from Postscript descriptions. ps2mf does the
  460.   basic conversion. This project wants to revive the use of MF for it is
  461.   a truly beautiful program with enormous possiblities.
  462.   
  463.   The following information comes from the README file for ps2mf:
  464.   
  465.   This is pfb2mf. It is a copyleft program. See the file COPYING for more
  466.   details. I suggest that for the translation of Type-One to readable
  467.   PostScript you use I. Lee Hetherington's Type-1-Utils. You can find
  468.   these somewhere on obelix.icce.rug.nl in pub/erikjan.
  469.   
  470.   If you find any bugs, please do report.
  471.   
  472.   If you have any complaints, please do report.
  473.   
  474.   Now for some info about the different stages. This package contains
  475.   four programs:
  476.   
  477.      * pfb2pfa
  478.   
  479.      * pfa2chr
  480.   
  481.      * chr2ps
  482.   
  483.      * ps2mf
  484.   
  485.   pfb2pfa
  486.   =======
  487.   
  488.   pfb2pfa will decompress an IBM (!) Postscript type 1 fontfile into
  489.   readable           and downloadable hexadecimal data.
  490.   
  491.   The resulting file still contains two layers of encryption:
  492.   
  493.      * eexec encryption
  494.   
  495.      * charstring encryption
  496.   
  497.   pfa2chr
  498.   =======
  499.   
  500.   pfa2chr will do an eexec-decryption of a readable hexadecimal font file
  501.   to a   fontfile with encrypted charstrings.
  502.   
  503.   chr2ps
  504.   ======
  505.   
  506.   chr2ps will perform a charstring-decryption of a font file with
  507.   encrypted   charstrings to fontfile with postscript commands for type 1
  508.   fonts.
  509.   
  510.   With a "-" as filename, these programs will read from <stdin> and write
  511.   to <stdout>. This way you can pipe the results, as in:
  512.   
  513.          pfb2pfa garmnd - | pfa2chr - - | chr2ps - garmnd
  514.   
  515.   This will create a garmnd.ps from garmnd.pfb without explicitely
  516.   creating the intermediate files.
  517.   
  518.   These previous stages can be replaced by (when using Lee Hetherington's
  519.   type-1-utils):
  520.   
  521.   t1disasm garmnd.pfb garmnd.ps
  522.   
  523.   ps2mf
  524.   =====
  525.   
  526.   This last stage will convert to a MetaFont program with the use of the
  527.   corresponding .afm file and a mapping configuration file. It can
  528.   convert   to an ordinary form with Bezier controlpoints. It can also
  529.   generate a curl   specification. For this last option specifify -C.
  530.   
  531. Subject: 10.17. Mac Bitmaps to BDF Format
  532.   
  533.   I [ed: who?] have posted a program which I hacked together for
  534.   extracting all NFNT and FONT resources from a MacBinary form of a
  535.   standard Mac file and dumping the fonts as Adobe BDF files.  It has only
  536.   been compiled and tested on a Sun system to date.  It can be fetched
  537.   from METIS.COM, /pub/mac2bdf.c.
  538.   
  539.   I wrote this tool to be able to use Mac Bitmaps under X Windows and
  540.   OpenWindows (which take Adobe BDF format files).
  541.   
  542.   This is Info file comp.fonts.faq.info, produced by Makeinfo-1.55 from
  543.   the input file FAQ.texinfo.
  544.   
  545.